IK Gradient Linear


IK Gradient Linear Image Number, X1, Y1, X2, Y2, Color1, Color2, Channel, Mode

Description

Draws a linear gradient. You can use the Mode parameter to control how it is drawn by specifying any combination of flags (see list). A flag can be combined by adding them together. By using the Channel parameter, you can mask channels for the gradient. This command does not work on render targets but the same effect can be achieved using the effect commands of Image Kit and a pixel shader.
A list of available modes are:
Constant nameConstantDescription
GRADIENT_FILLSTART1If this flag is specified, the area before the gradient will be colored with Color1.
GRADIENT_FILLEND2If this flag is specified, the area behind the gradient will be colored with Color2.

For example: IK Gradient Linear 1, 5, 5, 251, 5, rgb(255, 0, 0), rgb(0, 255, 0), 0x00FFFF00, 3
This will draw a gradient starting at (5, 5) with the color red and ending in (251, 5) with the color green. At the same time it will ignore the alpha and blue channel when drawing. The 3 (=1 + 2) specifies that the area before and after the gradient are used as well.

Parameters

Image NumberIntegerThe ID of the image.
X1IntegerThe X coordinate of the starting point of the gradient.
Y1IntegerThe Y coordinate of the starting point of the gradient.
X2IntegerThe X coordinate of the end point of the gradient.
Y2IntegerThe Y coordinate of the end point of the gradient.
Color1DWORDThe Color of the starting point of the gradient.
Color2DWORDThe color of the end point of the gradient.
ChannelDWORDThe channel(s) used for the gradient.
ModeIntegerThe draw mode of the gradient.


Index